home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
-
- #include "msghdr.hpp"
-
- /*=========================================================================*/
-
- void MsgHdr::From (char *name)
-
- {
- strcpy (hdr.who_from, name);
- hdr.orig_zone = 0;
- hdr.orig_net = 0;
- hdr.orig_node = 0;
- };
-
- void MsgHdr::From (char *name, int zone, int net, int node)
-
- {
- strcpy (hdr.who_from, name);
- hdr.orig_zone = zone;
- hdr.orig_net = net;
- hdr.orig_node = node;
- }
-
- void MsgHdr::To (char *name)
-
- {
- strcpy (hdr.who_to, name);
- hdr.dest_zone = 0;
- hdr.dest_net = 0;
- hdr.dest_node = 0;
- }
-
- void MsgHdr::To (char *name, int zone, int net, int node)
-
- {
- strcpy (hdr.who_to, name);
- hdr.dest_zone = zone;
- hdr.dest_net = net;
- hdr.dest_node = node;
- }
-
- void MsgHdr::Subject (char *subject)
-
- {
- strcpy (hdr.subject, subject);
- }
-
- void MsgHdr::SetAttribute (unsigned attributes)
-
- {
- hdr.net_attr |= (attributes >> 8);
- hdr.msg_attr |= (attributes & 0xff);
- }
-
- void MsgHdr::UnsetAttribute (unsigned attributes)
-
- {
- hdr.net_attr &= ~(attributes >> 8);
- hdr.msg_attr &= ~(attributes & 0xff);
- }
-